<?php

class Adept_Template_Component_Tag_Listener extends Adept_Template_Tag
{
    
    public function generate($writer) 
    {
    	$componentTag = $this->getParent();
    	$ref = $componentTag->getElementRefCode();
    	$writer->writePhp("{$ref}->addListenerBinding(");
    	
    	$this->getAttribute('event')->generate($writer);
    	$writer->writePhp(', ');
    	$this->getAttribute('binding')->generate($writer);
    	$writer->writePhp("); \n");
    }	
    
}

